# Maintainer: Jonas Witschel <diabonas@archlinux.org>
pkgname=python-mpris2
pkgver=1.0.2
_commit=67356f29d68e29c7f3f0ddda5aaad6f68899b2bd
pkgrel=2
pkgdesc='Python usable definiton of MPRIS2'
arch=('any')
url='https://github.com/hugosenari/mpris2'
license=('GPL')
depends=('dbus-python' 'python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("git+$url.git#commit=$_commit")
sha512sums=('SKIP')

build() {
	cd "${pkgname#python-}"
	python -m build --wheel --no-isolation
}

check() {
	cd "${pkgname#python-}"
	pytest
}

package() {
	cd "${pkgname#python-}"
	python -m installer --destdir="$pkgdir" dist/*.whl
}
